#include "FileHelper.h"

CFileHelper::CFileHelper(void)
{
}

CFileHelper::~CFileHelper(void)
{
}

BOOL CFileHelper::Open(CString path)
{
	return m_file.Open(path, CFile::modeCreate | CFile::modeWrite);
}

void CFileHelper::Close()
{
	m_file.Flush();
	m_file.Close();
}


BOOL CFileHelper::Write(const char *buff, DWORD &size)
{
	try
	{
		m_file.Write(buff, size);
		return TRUE;
	}
	catch(CFileException &)
	{
		return FALSE;
	}
}